#!/bin/bash
createDir(){
    if [ ! -d "${1}/" ];then
    mkdir -p $1
    echo "${1} 创建完成"
    else
    echo "$1 文件夹已经存在"
    fi
}
docker_path=/var/local/docker
redis_path=${docker_path}/redis
nginx_path=${docker_path}/nginx
createDir ${redis_path}/data
createDir ${redis_path}/conf
createDir ${nginx_path}/log
createDir ${nginx_path}/conf.d
#下载redis配置文件
cd /var/local/docker/redis/conf
if [ ! -f "/var/local/docker/redis/conf/redis.conf" ];then
wget  http://download.redis.io/redis-stable/redis.conf
fi
